#!/usr/bin/python

import Image, ImageFont, ImageDraw, sys

if sys.argv[1] is '-h' or '--help':
    print """
        Usage: ~/current/dir$ python TCODfont.py path/to/font.ttf fontsize
          """

fontpath = 'Anonymous.ttf'
fontpoint = 12

image = Image.new('RGB', [fontpoint*16, fontpoint*16])
draw = ImageDraw.Draw(image)
font = ImageFont.truetype(fontpath, fontpoint)


i = 0
for row in range(0, 16):
    for col in range(0, 16):

        xpos = fontpoint*col+1
        ypos = fontpoint*row

        draw.text((xpos, ypos), chr(i), font=font)
        i += 1

image.save('tcod.png')

